package com.youkeyi.ddy.cloud.common.api.application.business.crm.order;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.order.dto.BusinessCustomerOrderFollowListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.order.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统客户订单跟进
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】order follow management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessCustomerOrderFollowCloudServiceFallback.class)
@RequestMapping("/business/customer/order/follow")
public interface BusinessCustomerOrderFollowCloudService {

    // 查询客户订单跟进列表
    @ApiOperation(value = "Query Business CustomerFollow List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerFollowCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessCustomerOrderFollowListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Business CustomerFollow List", dataType = "BusinessCustomerFollowListCloudParam", dataTypeClass = BusinessCustomerOrderFollowListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessCustomerOrderFollowListCloudDto list(BusinessCustomerOrderFollowListCloudParam param);

    // 创建客户订单跟进
    @ApiOperation(value = "Create Business CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.server.BusinessCustomerFollowCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Business CustomerFollow", dataType = "BusinessCustomerFollowCreateCloudParam", dataTypeClass = BusinessCustomerOrderFollowCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessCustomerOrderFollowCreateCloudParam param);


    // 编辑客户订单跟进
    @ApiOperation(value = "Update Business CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.server.BusinessCustomerFollowCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Business CustomerFollow", dataType = "BusinessCustomerFollowUpdateCloudParam", dataTypeClass = BusinessCustomerOrderFollowUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessCustomerOrderFollowUpdateCloudParam param);


    // 删除客户订单跟进
    @ApiOperation(value = "Delete Business CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.server.BusinessCustomerFollowCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Business CustomerFollow", dataType = "BusinessCustomerFollowDeleteCloudParam", dataTypeClass = BusinessCustomerOrderFollowDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessCustomerOrderFollowDeleteCloudParam param);

}
